﻿namespace Glorysoft.EAP.Contracts.MESClient.Models
{
    //"ACTIONTYPE": "ProcessData",
    //       "LOTID": "SFE20190404001",
    //        "PROCESSINFOLIST": [
    //           {
    //               "COMPONENTID": "SFE2019040400100002",
    //               "POSITION": "25",
    //               "EQUIPMENTTYPE": "HFWET34",
    //               "EQUIPMENTID": "TEMP",
    //               "RECIPENAME": "",
    //               "STARTTIME": "2019-04-22 10:10:10",
    //               "ENDTIME": "2019-04-22 10:10:10",
    //               "DATALIST": [
    //                   {
    //                       "DVNAME": "SE_L1T_AVG",
    //                       "DVVALUE": "20"
    public class RequestProcessDataReportBody
    {
        public string ACTIONTYPE { get; set; }
        public string LOTID { get; set; }
        public PROCESSINFO[] PROCESSINFOLIST { get; set; }
    }

    public class PROCESSINFO
    {
        public string COMPONENTID { get; set; }
        public string POSITION { get; set; }
        public string EQUIPMENTTYPE { get; set; }
        public string EQUIPMENTID { get; set; }
        public string RECIPENAME { get; set; }
        public string STARTTIME { get; set; }
        public string ENDTIME { get; set; }
        //public DVDATA[] DATALIST { get; set; }
    }

    public class RequestProcessDataReport : Requestobject
    {
        public RequestProcessDataReport(string ACTIONTYPE, string LOTID, PROCESSINFO[] PROCESSINFOLIST) : base("CASC.CASCPROCESSDATAREPORT")
        {
            Request.Body = new RequestProcessDataReportBody() { ACTIONTYPE = ACTIONTYPE, LOTID = LOTID, PROCESSINFOLIST = PROCESSINFOLIST };
        }
    }
}
